﻿@using BeYourMarket.Core;
@using BeYourMarket.Core.Plugins;
@using Microsoft.Practices.Unity;

@helper DisplayYesNo(bool value)
{
    var text = value ? "[[[Yes]]]" : "[[[No]]]";

    <span>@text</span>
}


@functions {
    // Check if payment method is setup on the platform
    public static bool IsPaymentSupport()
    {
        var descriptors = ContainerManager.GetConfiguredContainer().Resolve<IPluginFinder>().GetPluginDescriptors<IHookPlugin>(LoadPluginsMode.InstalledOnly, "Payment").Where(x => x.Enabled);
        return descriptors.Count() > 0;
    }
} 